package com.zzty.txj1.dao;

import com.zzty.txj1.entity.Question;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuestionMapper {
    @Insert("insert into question(content) values(#{content})")
    Integer insertContent(String content);

    @Select("select * from question")
    List<Question> getAllQuestion();

    @Select("select * from question where id=#{id}")
    Question getQuestionById(Integer id);

}
